/**
 * Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
 */
export enum MessageType {
  EMPTY = 0,
  SCHEMA_NEGOTIATE,
  CACHE_UPDATE, // useless for js sdk.
  OBJECT_UPDATE,
  TRANSACTION,
  OBJECT_QUERY,
  QUERY_SUB,
  QUERY_UNSUB,
  QUERY_SUB_PUSH,
  ENCRYPTION_TASK,
  USER_DATA_QUERY
}

export enum MessageSubType {
  EMPTY,
  QUERY_SALT_VALUE,
  QUERY_CIPHER_TEST,
  UPDATE_CIPHER_TEXT,
  INSERT_ENCRYPTION_INFO,
  UPDATE_ENCRYPTION_INFO,
  NOTIFY_ENCRYPTION_COMMAND_CHANGED,
  NOTIFY_ENCRYPTION_KEY_CHANGE_TO_NORMAL,
  NOTIFY_ENCRYPTION_KEY_CHANGE_TO_UPDATING,
  NOTIFY_ENCRYPTION_KEY_CHANGE_TO_UPDATE_INTERRUPT,
  MONITOR_USER_COMMAND_CHANGE,
  MONITOR_DATA_KEY_CHANGE
}

export enum OperationType {
  SYNC_UPSERT = 1,
  SYNC_DELETE = 2,
  VERIFY = 3
}

export enum ServerPushOperationType {
  ALL = 0,
  UPSERT = 1,
  DELETE = 2
}
